package GUI;

import java.awt.Color;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.ScrollPaneConstants;

public class ConsoleGUI extends JScrollPane {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	JTextArea ConsoleWrite;
	/**
	 * Create the panel.
	 */
	public ConsoleGUI() {
		
		this.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		this.setBounds(0, 0, 444, 272);
		//this.add(scrollPane);
		
		ConsoleWrite = new JTextArea();
		ConsoleWrite.setEditable(false);
		ConsoleWrite.setLineWrap(true);
		ConsoleWrite.setForeground(Color.GREEN);
		ConsoleWrite.setBackground(Color.BLACK);
		this.setViewportView(ConsoleWrite);
	}
	public void setMessageToScreen(String msessage){
		ConsoleWrite.setText(ConsoleWrite.getText() + "\n >"+msessage);
	}
}
